<!DOCTYPE html>
<html lang="en">
    <head>
        <STYLE type="text/css">
            BODY { background: url('<?php echo base_url(); ?>library/blueloginbox/images/bg.jpg'); }
        </STYLE>
        <link href="<?php echo base_url(); ?>library/dropdownmenu/new.css" media="screen" rel="stylesheet" type="text/css" />
        <meta charset="utf-8" />

    </head>
    <body>
        <?php
        require_once('header_admin.php');
        ?>
        <div style='height:20px;'></div>
        <div style="font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif; font-size: 12px;">
            <i>Image Ideal (Preview) = 200px X 100px, Aspek Ratio 2:1</i> <br />
            <i>Image Ideal (Slide) = 800px X 400px, Aspek Ratio 2:1</i> <br />            
            
            <?php
            $ref = "/KEGIATAN/".$id;
            $page= "admin/kegiatan_detil";

            echo form_open("foto/tambah".$ref);
            echo anchor("foto/kegiatan", 'Kembali');
            echo '<input type="submit" value="Tambah_Foto" />';
            echo '<input type="hidden" name="page_sender" value="'.$page.'" />';
            echo form_close();

            if (isset($error)) echo "<b>".$error."</b><br/>";
            if (isset($success)) echo "<b>".$success."</b><br/>";

            echo "<br/><br/>";
            
            foreach($listFoto as $row) {
                echo form_open_multipart('foto/uploader/foto/'.$row->ID.$ref);
                echo "<img src='".str_replace("index.php", "", base_url())."foto/".$row->PATH."' width='200px'/>";
                echo '<input type="file" name="foto" size="20" /><br>';
                echo "Judul Foto : <input type='text' name='title' size='55' value ='".$row->TITLE."'/>";
                echo '<input type="hidden" name="page_sender" value="'.$page.'" />';
                echo '<input type="submit" value="Ganti_Foto" />';
                echo form_close();

                echo form_open("foto/hapus".$ref."/".$row->ID);
                echo '<input type="submit" value="Hapus_Foto" />';
                echo '<input type="hidden" name="page_sender" value="'.$page.'" />';
                echo form_close();

                echo "<br/><br/>";
            }
            ?>

        </div>
        <!-- Beginning footer -->
        <div></div>
        <!-- End of Footer -->
    </body>
</html>